package com.bangyu.monitor.modular.system.mapper;

import com.bangyu.monitor.modular.system.entity.Bridge;
import com.bangyu.monitor.modular.system.entity.Risk;
import com.bangyu.monitor.modular.system.entity.RiskCount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 风险 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2018-12-07
 */
public interface RiskMapper extends BaseMapper<Risk> {

    void batchInsert(@Param("batchs") List<Risk> risks);

    List<Risk> emergencyBendValueRisk(@Param("beamNo") String beamNo);

    Page<Risk> pageQueryByBridges(@Param("page") Page page,@Param("bridgeIds") List bridgeIds,@Param("riskLevel") Integer riskLevel,@Param("riskType") Integer riskType);

    Integer bridgeCountOfRisk(@Param("bridgeIds") List<Long> bridgeIds,@Param("riskLevel") Integer riskLevel,@Param("startDate") Integer startDate,@Param("endDate") Integer endDate);

    List<RiskCount> riskCountByLevelAndType(@Param("beamNo") String beamNo,@Param("startDate") Integer startDate,@Param("endDate") Integer endDate);


}
